<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <title>秒杀列表页</title>
    <link rel="stylesheet" type="text/css" th:href="@{http://apps.bdimg.com/libs/bootstrap/3.3.0/css/bootstrap.min.css}"/>
    <script type="text/javascript" th:src="@{https://cdn.bootcss.com/jquery/3.4.1/jquery.js}"></script>
    <script type="text/javascript" th:src="@{http://apps.bdimg.com/libs/bootstrap/3.3.0/js/bootstrap.min.js}"></script>
</head>

<body>
<div class="container">
    <div class="panel panel-default">
        <div class="panel-heading text-center">
            <h2>秒杀列表</h2>
        </div>
        <div class="panel-body">
            <table class="table table-hover" id="goodslist">

                <thead>
                <tr>
                    <td>商品名称</td>
                    <td>商品图片</td>
                    <td>商品原价</td>
                    <td>秒杀价</td>
                    <td>库存</td>
                    <td>开始时间</td>
                    <td>结束时间</td>
                    <td>详情页</td>
                </tr>
                </thead>

                <tbody>

                <tr th:each="goods,goodsStat : ${goodslist}">
                    <td th:text="${#strings.abbreviate(goods.name,25)}" th:title="${goods.name}"></td>
                    <td><img th:src="@{${goods.goodsImg}}" width="100" height="100"/></td>
                    <td th:text="${goods.originalPrice}"></td>
                    <td th:text="${goods.miaoshaPrice}"></td>
                    <td th:text="${goods.store}"></td>
                    <td th:text="${#dates.format(goods.startTime,'yyyy-MM-dd HH:mm:ss')}"></td>
                    <td th:text="${#dates.format(goods.endTime,'yyyy-MM-dd HH:mm:ss')}"></td>
                    <td><a th:href="'.././detail?goodsId='+${goods.id}   ">详情</a></td>
                </tr>
                </tbody>
            </table>
			
        </div>
    </div>
</div>

</body>
</html>